
from osgeo import gdal


gcp_items = [
    [113.203125,    22.431340156360612, 0,      0],     # 左上
    [113.73046875,  22.431340156360612, 767,    0],     # 右上
    [113.203125,    21.943045533438177, 0,      767],   # 左下
    [113.73046875,  21.943045533438177, 767,    767]    # 右下
]

gcp_list = []
for item in gcp_items:
    x, y, pixel, line = item
    z = 0
    gcp = gdal.GCP(x, y, z, pixel, line)
    gcp_list.append(gcp)

options = gdal.TranslateOptions(format='GTiff', outputSRS='EPSG:4326',GCPs=gcp_list)
gdal.Translate('OK2.tiff', 'merge.jpg', options=options)
